Conversation
This was referenced Sep 10, 2026
Introduce API registration, request context, version validation, and asynchronous error mapping. Fix request buffer ownership and response serialization cleanup while preserving the existing ApiVersions entry point. Validated with mvn -o -pl fluss-rpc,fluss-kafka verify. Co-Authored-By: Codex <noreply@openai.com> AI-Model: gpt-6 AI-Contributed/Feature: 555/555 AI-Contributed/UT: 525/525
Catch failures while mapping asynchronous handler results so the dispatcher future completes exceptionally instead of remaining pending. Cover handler futures that fail before and after dispatch registers its callback. Validated with Java 11: Maven reactor build and 17 targeted Kafka tests, including Checkstyle, Spotless, and license checks. Co-Authored-By: Codex <noreply@openai.com> AI-Model: gpt-6 AI-Contributed/Feature: 27/27 AI-Contributed/UT: 28/28
Route requests through the dispatcher and advertise only implemented APIs. Return version-aware errors for unsupported APIs and invalid requests. Validated with mvn -o -pl fluss-kafka verify (23 unit tests and 1 IT). Co-Authored-By: Codex <noreply@openai.com> AI-Model: gpt-6 AI-Contributed/Feature: 313/313 AI-Contributed/UT: 137/137
Extract topic identity and the raw/string table mapping contract before Metadata. Validate table kinds, field projections and metadata columns independently of request handling and record decoding. Validation: Java 11, mvn -o -pl fluss-kafka clean verify (47 unit tests and 2 integration tests); Checkstyle, Spotless and RAT passed. Co-Authored-By: Codex <noreply@openai.com> AI-Model: gpt-6 AI-Contributed/Feature: 769/769 AI-Contributed/UT: 480/480
Resolve database.table topic names directly to Fluss table paths and return qualified names for metadata. Validate name boundaries and cover same-named tables in different databases through native metadata round trips. Read projected field names directly from DataField to avoid rebuilding the complete field-name list for every projected column. Validated on Java 11: 67 Kafka unit tests and 2 integration tests passed, along with Checkstyle, Spotless, RAT, and git diff --check. Co-Authored-By: Codex <noreply@openai.com> AI-Model: gpt-6 AI-Contributed/Feature: 52/52 AI-Contributed/UT: 167/167
gyang94
force-pushed
the
codex/kafka-ddl-table-mapping
branch
from
September 17, 2026 03:40
6b9626d to
4361fa1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Closes #4275. Part of #4185.
Define the shared DDL table mapping contract used by Metadata and Produce. A Kafka topic named
database.tableresolves directly to that Fluss table, so tables with the same name in different databases remain distinct. The physical schema andkafka.*custom properties define how record fields map to table columns.This is PR03 in the foundation sequence, based on PR02 (#4260, commit
5742b36627fe156a8cf499f0aa7b4b8c4163e9a7); Metadata follows as PR04 (#4261).Brief change log
curator-testversion in test scope for the cluster fixture.Relative to PR02: 10 files, +1374 / -0 lines (791 production/build and 583 test lines). The change keeps the mapping contract and its validation together. Record decoding, Arrow encoding, Metadata handlers, Produce, JSON, and authentication follow in later PRs.
Tests
Validated on Java 11 with the source tree committed as
4361fa11b227f6d5573757b21499f692a289cc12:KafkaRequestITCaseandKafkaTableMappingITCasepassed: 2 integration tests, including cross-database mapping and native metadata readback.git diff --checkpassed.The full repository test suite and a Flink SQL runtime were not run. The later delivery stage will cover the full DDL → Metadata → Kafka producer → Fluss readback workflow.
API and Format
Uses the existing table schema and custom-property storage.
kafka.value.formatis required; key mapping is optional. Each mapped raw or string component requires exactly one BYTES or STRING column respectively. Configured key fields requirekafka.value.fields-include=EXCEPT_KEY; timestamp and headers use explicitly named physical columns and are excluded from the value projection. Column names are user-defined.Topic names must use
database.table; bare table names do not fall back to a configured database. Reverse mapping returns the same fully qualified name.No Kafka API is newly advertised by this PR. Table creation continues through existing Fluss DDL/Admin or the Flink catalog; the resolver validates the stored mapping when called by subsequent API layers. Kafka CreateTopics/DeleteTopics and automatic creation are out of scope.
Documentation
The contract is described in this PR, source Javadoc, and executable tests. User-facing delivery examples follow with the later Produce capability.
Stack and review
This PR remains a draft while its prerequisites are unmerged. It targets Apache
main, so the Files changed view includes the foundation prerequisites. Review DDL mapping alone using the incremental comparison against PR02.Generative AI disclosure: Codex assisted with implementation, testing, and commit organization. Human review is required before merge.